CREATE TABLE [dbo].[TTPORC_IMPT]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[NU_ANNO] [dbo].[TD_IN_004_ANNO] NOT NULL CONSTRAINT [DF__TTPORC_IM__NU_AN__62E4AA3C] DEFAULT (datepart(year,getdate())),
[NU_MESE] [dbo].[TD_IN_002_MESE] NOT NULL,
[PO_IMPT_VEN1] [dbo].[TD_NU_009_004] NOT NULL CONSTRAINT [DF__TTPORC_IM__PO_IM__65C116E7] DEFAULT ((1.000)),
[PO_IMPT_VEN2] [dbo].[TD_NU_009_004] NOT NULL CONSTRAINT [DF__TTPORC_IM__PO_IM__67A95F59] DEFAULT ((1.000)),
[PO_IMPT_REN1] [dbo].[TD_NU_009_004] NOT NULL CONSTRAINT [DF__TTPORC_IM__PO_IM__6991A7CB] DEFAULT ((1.000)),
[PO_IMPT_REN2] [dbo].[TD_NU_009_004] NOT NULL CONSTRAINT [DF__TTPORC_IM__PO_IM__6B79F03D] DEFAULT ((1.000)),
[PO_IMPT_FON1] [dbo].[TD_NU_009_004] NOT NULL CONSTRAINT [DF__TTPORC_IM__PO_IM__6D6238AF] DEFAULT ((1.000)),
[PO_IMPT_FON2] [dbo].[TD_NU_009_004] NOT NULL CONSTRAINT [DF__TTPORC_IM__PO_IM__6F4A8121] DEFAULT ((1.000)),
[PO_RETE_IIGV] [dbo].[TD_NU_009_004] NOT NULL CONSTRAINT [DF__TTPORC_IM__PO_RE__7132C993] DEFAULT ((1.000)),
[PO_CUAR_CAT1] [dbo].[TD_NU_009_004] NOT NULL CONSTRAINT [DF__TTPORC_IM__PO_CU__731B1205] DEFAULT ((1.000)),
[PO_CUAR_CAT2] [dbo].[TD_NU_009_004] NOT NULL CONSTRAINT [DF__TTPORC_IM__PO_CU__75035A77] DEFAULT ((1.000)),
[PO_PERC_NAGP] [dbo].[TD_NU_009_004] NULL CONSTRAINT [DF__TTPORC_IM__PO_PE__76EBA2E9] DEFAULT ((1.000)),
[PO_PERC_SAGP] [dbo].[TD_NU_009_004] NULL CONSTRAINT [DF__TTPORC_IM__PO_PE__78D3EB5B] DEFAULT ((1.000)),
[PO_PERC_SAGR] [dbo].[TD_NU_009_004] NULL CONSTRAINT [DF__TTPORC_IM__PO_PE__7ABC33CD] DEFAULT ((1.000)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL,
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTPORC_IM__FE_US__7CA47C3F] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL,
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTPORC_IM__FE_US__7D98A078] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTPORC_IMPT] ADD CONSTRAINT [CK__TTPORC_IM__NU_AN__63D8CE75] CHECK (([NU_ANNO]>=(0)))
GO
ALTER TABLE [dbo].[TTPORC_IMPT] ADD CONSTRAINT [CK__TTPORC_IM__NU_ME__64CCF2AE] CHECK (([NU_MESE]>=(0) AND [NU_MESE]<=(13)))
GO
ALTER TABLE [dbo].[TTPORC_IMPT] ADD CONSTRAINT [CK__TTPORC_IM__PO_CU__740F363E] CHECK (([PO_CUAR_CAT1]>=(0)))
GO
ALTER TABLE [dbo].[TTPORC_IMPT] ADD CONSTRAINT [CK__TTPORC_IM__PO_CU__75F77EB0] CHECK (([PO_CUAR_CAT2]>=(0)))
GO
ALTER TABLE [dbo].[TTPORC_IMPT] ADD CONSTRAINT [CK__TTPORC_IM__PO_IM__66B53B20] CHECK (([PO_IMPT_VEN1]>=(0)))
GO
ALTER TABLE [dbo].[TTPORC_IMPT] ADD CONSTRAINT [CK__TTPORC_IM__PO_IM__689D8392] CHECK (([PO_IMPT_VEN2]>=(0)))
GO
ALTER TABLE [dbo].[TTPORC_IMPT] ADD CONSTRAINT [CK__TTPORC_IM__PO_IM__6A85CC04] CHECK (([PO_IMPT_REN1]>=(0)))
GO
ALTER TABLE [dbo].[TTPORC_IMPT] ADD CONSTRAINT [CK__TTPORC_IM__PO_IM__6C6E1476] CHECK (([PO_IMPT_REN2]>=(0)))
GO
ALTER TABLE [dbo].[TTPORC_IMPT] ADD CONSTRAINT [CK__TTPORC_IM__PO_IM__6E565CE8] CHECK (([PO_IMPT_FON1]>=(0)))
GO
ALTER TABLE [dbo].[TTPORC_IMPT] ADD CONSTRAINT [CK__TTPORC_IM__PO_IM__703EA55A] CHECK (([PO_IMPT_FON2]>=(0)))
GO
ALTER TABLE [dbo].[TTPORC_IMPT] ADD CONSTRAINT [CK__TTPORC_IM__PO_PE__77DFC722] CHECK (([PO_PERC_NAGP]>=(0)))
GO
ALTER TABLE [dbo].[TTPORC_IMPT] ADD CONSTRAINT [CK__TTPORC_IM__PO_PE__79C80F94] CHECK (([PO_PERC_SAGP]>=(0)))
GO
ALTER TABLE [dbo].[TTPORC_IMPT] ADD CONSTRAINT [CK__TTPORC_IM__PO_PE__7BB05806] CHECK (([PO_PERC_SAGR]>=(0)))
GO
ALTER TABLE [dbo].[TTPORC_IMPT] ADD CONSTRAINT [CK__TTPORC_IM__PO_RE__7226EDCC] CHECK (([PO_RETE_IIGV]>=(0)))
GO
ALTER TABLE [dbo].[TTPORC_IMPT] ADD CONSTRAINT [XPKTTPORC_IMPT] PRIMARY KEY CLUSTERED  ([CO_EMPR], [NU_ANNO], [NU_MESE]) ON [PRIMARY]
GO
